var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = require('mongoose').Schema.Types.ObjectId;
// var ObjectId = require('mongoose').Types.ObjectId;
// Define User schema 
var _lession = new Schema({ 
    lessionname : String,
    desc : String,
    res : [],
    img : String,
    typeid : {type:ObjectId},
    user : [],
    create_time: { type: Date, default: Date.now },
    update_time: { type: Date, default: Date.now }
});

// export them 
exports.lession = mongoose.model('lession', _lession);